package com.example.interactivehouse;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AlarmScreen extends Activity{
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.alarm);
        final Button window = (Button)findViewById(R.id.alarm);
        final Button home = (Button)findViewById(R.id.homeal);
        final Button open = (Button)findViewById(R.id.onalarm);
        final Button close = (Button)findViewById(R.id.offalarm);
        open.setOnClickListener(new OnClickListener() {
        	public void onClick(View v) { 
        		window.setBackgroundResource(R.drawable.alarmon); 
        	}        
        });
        close.setOnClickListener(new OnClickListener() {
        	public void onClick(View v) { 
        		window.setBackgroundResource(R.drawable.alarmoff); 
        	}        
        });
        home.setOnClickListener(new OnClickListener() {
        	public void onClick(View v) { 
        		home.setBackgroundResource(R.drawable.hometap); 
        		Intent i = new Intent(AlarmScreen.this,InteraciveHouse.class);     
    			startActivity(i);
        	}        
        });
	}
}
